<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Guestbook Form</title>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
<script type="text/javascript" src="/javascripts/main.js"></script>
</head>
<body>
Back to <a 	href="/guestbooklist">Guestbook</a>
<br/>
<br/>
<form action="/sign" method="post" >
	<fieldset>
    	<legend>Post Message</legend>
        <p>You can post a message here</p>
<table width="100%" border="0" cellspacing="0">
	<tr>
		<th width="150px"></th>
		<th></th>
	</tr>
	<tr>
		<td><label for="userName">Name:<span class="required">*</span></label></td>
		<td><input name="userName"
			class="${form.messages.userName  != null ? 'highlight' : ''}"
			value="<c:out value="${greeting.userName}" />" size="30"
			maxlength="50" /> <span class="error">${form.messages.userName}</span></td>
	</tr>
	<tr>
		<td><label for="userEmail">Email:<span class="required">*</span></label></td>
		<td><input name="userEmail"
			class="${form.messages.userEmail  != null ? 'highlight' : ''}"
			value="<c:out value="${greeting.userEmail}" />" size="30"
			maxlength="60" /> <span class="error">${form.messages.userEmail}</span></td>
	</tr>
	<tr>
		<td><label for="content">Message:<span class="required">*</span></label></td>
		<td><textarea name="content" rows="4" cols="60"
			class="${form.messages.content  != null ? 'highlight' : ''}"
			value="<c:out value="${greeting.content}" />">${greeting.content}</textarea>
		<span class="error">${form.messages.content}</span></td>
	</tr>
	<tr>
		<td><label for="captcha"><span class="required">*</span></label></td>
		<td>${capthcahtml}<span class="error">${form.messages.recaptcha_response_field}</span></td>
	</tr>
</table>
<br/>
		
		</td>
		<div>
		<input type="submit" value="Post Message" class="withoutLabel"  />
		</div>
		<p class="${form.success ? 'success' : 'error'}">${form.messages.result}</p>
	</fieldset>

</form>
        <script type="text/javascript">
            //setHighlight('${form != null ? form.highlight : ''}');
            setFocus('${form != null ? form.focus : 'username'}');
        </script>

</body>
</html>